package com.bt7274.controller;

/**
 * @Data 2025/6/13 01:27
 * @Author hp
 * @Version 1.0
 * @Description EmojiController
 */

import com.bt7274.grace.result.GraceJSONResult;
import com.bt7274.pojo.Emoji;
import com.bt7274.service.EmojiService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("emoji")
@Tag(name = "表情包管理", description = "表情包相关操作")
public class EmojiController {

    @Resource
    private EmojiService emojiService;

    /**
     * 获取所有表情包 URL 列表
     * @return 包含所有表情包信息的 JSON 结果
     */
    @GetMapping("/list")
    @Operation(summary = "获取所有表情包 URL 列表", description = "获取系统中所有表情包的 URL 信息")
    public GraceJSONResult getAllEmojis() {
        List<Emoji> emojis = emojiService.getAllEmojis();
        return GraceJSONResult.ok(emojis);
    }
}
